﻿@model XHouse.Model.Aparatos.Aparato

@{
    ViewBag.Title = "Edit";
}


<div class="row">
    <div class="col-xs-12 col-md-10 col-md-offset-1">
        <div class="page-header">
        <h3>Editar datos del Aparato</h3>
      </div>
        @using (Html.BeginForm(null, null, FormMethod.Post, new { @class = "form-horizontal", @role = "form" }))
        {
            @Html.ValidationSummary(true)
    
        
            
            <div class="form-group">
                <label for="Numero" class="col-lg-2 control-label">Número</label>
                <div class="col-lg-3">
                    @Html.TextBoxFor(model => model.Numero, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Numero, String.Empty, new { @class = "help-block", @style ="color: red;" })
                </div>
            </div>
            <div class="form-group">
                <label for="Nombre" class="col-lg-2 control-label">Nombre</label>
                <div class="col-lg-3">
                    @Html.TextBoxFor(model => model.Nombre, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Nombre, String.Empty, new { @class = "help-block", @style ="color: red;" })
                </div>
            </div>
            <div class="form-group">
                <label for="Descripcion" class="col-lg-2 control-label">Descripción</label>
                <div class="col-lg-3">
                    @Html.TextBoxFor(model => model.Descripcion, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Descripcion, String.Empty, new { @class = "help-block", @style ="color: red;" })
                </div>
            </div>
            
            <div class="form-group">
                <div class="col-lg-offset-2 col-lg-3">
                    <div class="checkbox">
                        <label> 
                            @Html.CheckBoxFor(model => model.Habilitado) Habilitado
                        </label>
                    </div>
                </div>
            </div>
        
            <div class="form-group">
                <label for="Tipo" class="col-lg-2 control-label">Tipo</label>
                <div class="col-lg-3">
                    @Html.DropDownListFor(model => model.TipoAparatoId, new SelectList(ViewBag.TiposAparatos, "Id", "Nombre", Model.TipoAparatoId), new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.TipoAparatoId, String.Empty, new { @class = "help-block", @style ="color: red;" })
                </div>
            </div>
            
            <div class="form-group">
                <label for="Zona" class="col-lg-2 control-label">Zona</label>
                <div class="col-lg-3">
                    @Html.DropDownListFor(model => model.ZonaId, new SelectList(ViewBag.Zonas, "Id", "Nombre", Model.ZonaId), new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.ZonaId, String.Empty, new { @class = "help-block", @style ="color: red;" })
                </div>
            </div>
            
            <div class="form-group">
                <label for="Modulo" class="col-lg-2 control-label">Módulo</label>
                <div class="col-lg-3">
                    @Html.DropDownListFor(model => model.ModuloId, new SelectList(ViewBag.Modulos, "Id", "Nombre", Model.ModuloId), new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.ModuloId, String.Empty, new { @class = "help-block", @style ="color: red;" })
                </div>
            </div>
            
            <div class="form-group">
                <label for="Ambiente" class="col-lg-2 control-label">Ambiente</label>
                <div class="col-lg-3">
                    @Html.DropDownListFor(model => model.AmbienteId, new SelectList(ViewBag.Ambientes, "Id", "Nombre", Model.AmbienteId), new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.AmbienteId, String.Empty, new { @class = "help-block", @style ="color: red;" })
                </div>
            </div>
            
            <div class="form-group">
                <label for="Puerto" class="col-lg-2 control-label">Puerto</label>
                <div class="col-lg-3">
                    @Html.TextBoxFor(model => model.Puerto, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Puerto, String.Empty, new { @class = "help-block", @style ="color: red;" })
                </div>
            </div>
            
            <div class="form-group">
                <label for="Posicion" class="col-lg-2 control-label">Posición del puerto </label>
                <div class="col-lg-3">
                    @Html.TextBoxFor(model => model.Posicion, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Posicion, String.Empty, new { @class = "help-block", @style ="color: red;" })
                </div>
            </div>

            <div class="form-group">
                <div class="col-lg-offset-2 col-lg-3">
                    <button class="btn btn-primary">Guardar</button>
                    <a class="btn btn-danger" href="@Url.Action("Index")">Cancelar</a>
                </div>
            </div>
        }

    </div>
</div>
